<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The TokyoTyrant class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="tokyo-tyrant.examples.html">范例</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tokyotyrant.add.html">TokyoTyrant::add</a></div>
 <div class="up"><a href="book.tokyo-tyrant.html">tokyo_tyrant</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.tokyotyrant" class="reference">

 <h1 class="title">The TokyoTyrant class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL tokyo_tyrant &gt;= 0.1.0)</p>


  <div class="section" id="tokyotyrant.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    The main Tokyo Tyrant class
   </p>
  </div>


  <div class="section" id="tokyotyrant.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">TokyoTyrant</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbdef-port"><var class="varname">RDBDEF_PORT</var></a></var>
     <span class="initializer"> = 1978</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-streq"><var class="varname">RDBQC_STREQ</var></a></var>
     <span class="initializer"> = 0</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-strinc"><var class="varname">RDBQC_STRINC</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-strbw"><var class="varname">RDBQC_STRBW</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-strew"><var class="varname">RDBQC_STREW</var></a></var>
     <span class="initializer"> = 3</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-strand"><var class="varname">RDBQC_STRAND</var></a></var>
     <span class="initializer"> = 4</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-stror"><var class="varname">RDBQC_STROR</var></a></var>
     <span class="initializer"> = 5</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-stroreq"><var class="varname">RDBQC_STROREQ</var></a></var>
     <span class="initializer"> = 6</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-strrx"><var class="varname">RDBQC_STRRX</var></a></var>
     <span class="initializer"> = 7</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-numeq"><var class="varname">RDBQC_NUMEQ</var></a></var>
     <span class="initializer"> = 8</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-numgt"><var class="varname">RDBQC_NUMGT</var></a></var>
     <span class="initializer"> = 9</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-numge"><var class="varname">RDBQC_NUMGE</var></a></var>
     <span class="initializer"> = 10</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-numlt"><var class="varname">RDBQC_NUMLT</var></a></var>
     <span class="initializer"> = 11</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-numle"><var class="varname">RDBQC_NUMLE</var></a></var>
     <span class="initializer"> = 12</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-numbt"><var class="varname">RDBQC_NUMBT</var></a></var>
     <span class="initializer"> = 13</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-numoreq"><var class="varname">RDBQC_NUMOREQ</var></a></var>
     <span class="initializer"> = 14</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-negate"><var class="varname">RDBQC_NEGATE</var></a></var>
     <span class="initializer"> = 16777216</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqc-noidx"><var class="varname">RDBQC_NOIDX</var></a></var>
     <span class="initializer"> = 33554432</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqo-strasc"><var class="varname">RDBQO_STRASC</var></a></var>
     <span class="initializer"> = 0</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqo-strdesc"><var class="varname">RDBQO_STRDESC</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqo-numasc"><var class="varname">RDBQO_NUMASC</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqo-numdesc"><var class="varname">RDBQO_NUMDESC</var></a></var>
     <span class="initializer"> = 3</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbit-lexical"><var class="varname">RDBIT_LEXICAL</var></a></var>
     <span class="initializer"> = 0</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbit-decimal"><var class="varname">RDBIT_DECIMAL</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbit-token"><var class="varname">RDBIT_TOKEN</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbit-qgram"><var class="varname">RDBIT_QGRAM</var></a></var>
     <span class="initializer"> = 3</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbit-opt"><var class="varname">RDBIT_OPT</var></a></var>
     <span class="initializer"> = 9998</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbit-void"><var class="varname">RDBIT_VOID</var></a></var>
     <span class="initializer"> = 9999</span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbit-keep"><var class="varname">RDBIT_KEEP</var></a></var>
     <span class="initializer"> = 16777216</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqcfts-ph"><var class="varname">RDBQCFTS_PH</var></a></var>
     <span class="initializer"> = 15</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqcfts-and"><var class="varname">RDBQCFTS_AND</var></a></var>
     <span class="initializer"> = 16</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqcfts-or"><var class="varname">RDBQCFTS_OR</var></a></var>
     <span class="initializer"> = 17</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbqcfts-ex"><var class="varname">RDBQCFTS_EX</var></a></var>
     <span class="initializer"> = 18</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbxolck-rec"><var class="varname">RDBXO_LCKREC</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbxolck-glb"><var class="varname">RDBXOLCK_GLB</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbrec-int"><var class="varname">RDBREC_INT</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbrec-dbl"><var class="varname">RDBREC_DBL</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbms-union"><var class="varname">RDBMS_UNION</var></a></var>
     <span class="initializer"> = 0</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbms-isect"><var class="varname">RDBMS_ISECT</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>


    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbms-diff"><var class="varname">RDBMS_DIFF</var></a></var>
     <span class="initializer"> = 2</span>
    ;</div>

    
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">integer</span>
      <var class="fieldsynopsis_varname"><a href="class.tokyotyrant.html#tokyotyrant.constants.rdbt-recon"><var class="varname">RDBT_RECON</var></a></var>
     <span class="initializer"> = 1</span>
    ;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">number</span><span class="methodname"><a href="tokyotyrant.add.html" class="methodname">add</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.number" class="type number">number</a></span> <code class="parameter">$increment</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code><span class="initializer"> = 0</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.connect.html" class="methodname">connect</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code><span class="initializer"> = TokyoTyrant::RDBDEF_PORT</span></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.connecturi.html" class="methodname">connectUri</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="tokyotyrant.construct.html" class="methodname">__construct</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code><span class="initializer"> = TokyoTyrant::RDBDEF_PORT</span></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.copy.html" class="methodname">copy</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="tokyotyrant.ext.html" class="methodname">ext</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="tokyotyrant.fwmkeys.html" class="methodname">fwmKeys</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$prefix</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$max_recs</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.get.html" class="methodname">get</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrantIterator</span><span class="methodname"><a href="tokyotyrant.getiterator.html" class="methodname">getIterator</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="tokyotyrant.num.html" class="methodname">num</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.out.html" class="methodname">out</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.put.html" class="methodname">put</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code><span class="initializer"> = NULL</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.putcat.html" class="methodname">putCat</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.putkeep.html" class="methodname">putKeep</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.putnr.html" class="methodname">putNr</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code><span class="initializer"> = NULL</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.putshl.html" class="methodname">putShl</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.restore.html" class="methodname">restore</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$log_dir</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$check_consistency</code><span class="initializer"> = true</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.setmaster.html" class="methodname">setMaster</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$timestamp</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$check_consistency</code><span class="initializer"> = true</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="tokyotyrant.size.html" class="methodname">size</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="tokyotyrant.stat.html" class="methodname">stat</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.sync.html" class="methodname">sync</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">TokyoTyrant</span><span class="methodname"><a href="tokyotyrant.tune.html" class="methodname">tune</a></span>
    ( <span class="methodparam"><span class="type">float</span> <code class="parameter">$timeout</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code><span class="initializer"> = TokyoTyrant::RDBT_RECON</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="tokyotyrant.vanish.html" class="methodname">vanish</a></span>
    ( <span class="methodparam">void</span>
   )</div>

   }</div>


  </div>
  

  <div class="section" id="tokyotyrant.constants">
   <h2 class="title">预定义常量</h2>
   <div class="section" id="tokyotyrant.constants.types">
    <h2 class="title">TokyoTyrant Constants</h2>
    <dl>


     
      <dt id="tokyotyrant.constants.rdbdef-port"><strong><code>TokyoTyrant::RDBDEF_PORT</code></strong></dt>

      <dd>

       <p class="para">The default port of the Tokyo Tyrant database</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-streq"><strong><code>TokyoTyrant::RDBQC_STREQ</code></strong></dt>

      <dd>

       <p class="para">string is equal to</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-strinc"><strong><code>TokyoTyrant::RDBQC_STRINC</code></strong></dt>

      <dd>

       <p class="para">string is included in</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-strbw"><strong><code>TokyoTyrant::RDBQC_STRBW</code></strong></dt>

      <dd>

       <p class="para">string begins with</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-strew"><strong><code>TokyoTyrant::RDBQC_STREW</code></strong></dt>

      <dd>

       <p class="para">string ends with</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-strand"><strong><code>TokyoTyrant::RDBQC_STRAND</code></strong></dt>

      <dd>

       <p class="para">string includes all tokens in</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-stror"><strong><code>TokyoTyrant::RDBQC_STROR</code></strong></dt>

      <dd>

       <p class="para">string includes at least one token in</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-stroreq"><strong><code>TokyoTyrant::RDBQC_STROREQ</code></strong></dt>

      <dd>

       <p class="para">string is equal to at least one token in</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-strrx"><strong><code>TokyoTyrant::RDBQC_STRRX</code></strong></dt>

      <dd>

       <p class="para">string matches regular expressions of</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-numeq"><strong><code>TokyoTyrant::RDBQC_NUMEQ</code></strong></dt>

      <dd>

       <p class="para">number is equal to</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-numgt"><strong><code>TokyoTyrant::RDBQC_NUMGT</code></strong></dt>

      <dd>

       <p class="para">number is greater than</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-numge"><strong><code>TokyoTyrant::RDBQC_NUMGE</code></strong></dt>

      <dd>

       <p class="para">number is greater than or equal to</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-numlt"><strong><code>TokyoTyrant::RDBQC_NUMLT</code></strong></dt>

      <dd>

       <p class="para">number is less than</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-numle"><strong><code>TokyoTyrant::RDBQC_NUMLE</code></strong></dt>

      <dd>

       <p class="para">number is less than or equal to</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-numbt"><strong><code>TokyoTyrant::RDBQC_NUMBT</code></strong></dt>

      <dd>

       <p class="para">number is between two tokens of</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-numoreq"><strong><code>TokyoTyrant::RDBQC_NUMOREQ</code></strong></dt>

      <dd>

       <p class="para">number is equal to at least one token in</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-negate"><strong><code>TokyoTyrant::RDBQC_NEGATE</code></strong></dt>

      <dd>

       <p class="para">negation flag</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqc-noidx"><strong><code>TokyoTyrant::RDBQC_NOIDX</code></strong></dt>

      <dd>

       <p class="para">no index flag</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqo-strasc"><strong><code>TokyoTyrant::RDBQO_STRASC</code></strong></dt>

      <dd>

       <p class="para">string ascending</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqo-strdesc"><strong><code>TokyoTyrant::RDBQO_STRDESC</code></strong></dt>

      <dd>

       <p class="para">string descending</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqo-numasc"><strong><code>TokyoTyrant::RDBQO_NUMASC</code></strong></dt>

      <dd>

       <p class="para">number ascending</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqo-numdesc"><strong><code>TokyoTyrant::RDBQO_NUMDESC</code></strong></dt>

      <dd>

       <p class="para">number descending</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbit-lexical"><strong><code>TokyoTyrant::RDBIT_LEXICAL</code></strong></dt>

      <dd>

       <p class="para">lexical string</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbit-decimal"><strong><code>TokyoTyrant::RDBIT_DECIMAL</code></strong></dt>

      <dd>

       <p class="para">decimal string</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbit-token"><strong><code>TokyoTyrant::RDBIT_TOKEN</code></strong></dt>

      <dd>

       <p class="para">token inverted index (Tokyo Tyrant &gt;= 1.1.29)</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbit-qgram"><strong><code>TokyoTyrant::RDBIT_QGRAM</code></strong></dt>

      <dd>

       <p class="para">QGRAM inverted index (Tokyo Tyrant &gt;= 1.1.29)</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbit-opt"><strong><code>TokyoTyrant::RDBIT_OPT</code></strong></dt>

      <dd>

       <p class="para">optimize</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbit-void"><strong><code>TokyoTyrant::RDBIT_VOID</code></strong></dt>

      <dd>

       <p class="para">void</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbit-keep"><strong><code>TokyoTyrant::RDBIT_KEEP</code></strong></dt>

      <dd>

       <p class="para">keep existing index</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqcfts-ph"><strong><code>TokyoTyrant::RDBQCFTS_PH</code></strong></dt>

      <dd>

       <p class="para">full-text search with the phrase of (Tokyo Tyrant &gt;= 1.1.29)</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqcfts-and"><strong><code>TokyoTyrant::RDBQCFTS_AND</code></strong></dt>

      <dd>

       <p class="para">full-text search with all tokens in (Tokyo Tyrant &gt;= 1.1.29)</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqcfts-or"><strong><code>TokyoTyrant::RDBQCFTS_OR</code></strong></dt>

      <dd>

       <p class="para">full-text search with at least one token in (Tokyo Tyrant &gt;= 1.1.29)</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbqcfts-ex"><strong><code>TokyoTyrant::RDBQCFTS_EX</code></strong></dt>

      <dd>

       <p class="para">full-text search with the compound expression of (Tokyo Tyrant &gt;= 1.1.29)</p>
      </dd>

     

    
     <dt id="tokyotyrant.constants.rdbms-union"><strong><code>TokyoTyrant::RDBQCFTS_AND</code></strong></dt>

     <dd>

      <p class="para">Metasearch union between records (Tokyo Tyrant &gt;= 1.1.33)</p>
     </dd>

    

    
     <dt id="tokyotyrant.constants.rdbms-isect"><strong><code>TokyoTyrant::RDBQCFTS_OR</code></strong></dt>

     <dd>

      <p class="para">Metasearch intersection between records (Tokyo Tyrant &gt;= 1.1.33)</p>
     </dd>

    

    
     <dt id="tokyotyrant.constants.rdbms-diff"><strong><code>TokyoTyrant::RDBQCFTS_EX</code></strong></dt>

     <dd>

      <p class="para">Metasearch difference between records (Tokyo Tyrant &gt;= 1.1.33)</p>
     </dd>

    

    
     <dt id="tokyotyrant.constants.rdbt-recon"><strong><code>TokyoTyrant::RDBT_RECON</code></strong></dt>

     <dd>

      <p class="para">Whether to reconnect on connection failure. 
            It is recommended to have this parameter on for persistent connections</p>
     </dd>

    

     
      <dt id="tokyotyrant.constants.rdbxolck-rec"><strong><code>TokyoTyrant::RDBXOLCK_REC</code></strong></dt>

      <dd>

       <p class="para">record locking</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbxolck-glb"><strong><code>TokyoTyrant::RDBXOLCK_GLB</code></strong></dt>

      <dd>

       <p class="para">global locking</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbrec-int"><strong><code>TokyoTyrant::RDBREC_INT</code></strong></dt>

      <dd>

       <p class="para">record type int</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.rdbrec-dbl"><strong><code>TokyoTyrant::RDBREC_DBL</code></strong></dt>

      <dd>

       <p class="para">record type float (double)</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-success"><strong><code>TokyoTyrant::TTE_SUCCESS</code></strong></dt>

      <dd>

       <p class="para">success</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-invalid"><strong><code>TokyoTyrant::TTE_INVALID</code></strong></dt>

      <dd>

       <p class="para">invalid operation</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-nohost"><strong><code>TokyoTyrant::TTE_NOHOST</code></strong></dt>

      <dd>

       <p class="para">host not found</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-refused"><strong><code>TokyoTyrant::TTE_REFUSED</code></strong></dt>

      <dd>

       <p class="para">connection refused</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-send"><strong><code>TokyoTyrant::TTE_SEND</code></strong></dt>

      <dd>

       <p class="para">send error</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-recv"><strong><code>TokyoTyrant::TTE_RECV</code></strong></dt>

      <dd>

       <p class="para">recv error</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-keep"><strong><code>TokyoTyrant::TTE_KEEP</code></strong></dt>

      <dd>

       <p class="para">record exist</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-norec"><strong><code>TokyoTyrant::TTE_NOREC</code></strong></dt>

      <dd>

       <p class="para">no record found</p>
      </dd>

     

     
      <dt id="tokyotyrant.constants.tte-misc"><strong><code>TokyoTyrant::TTE_MISC</code></strong></dt>

      <dd>

       <p class="para">miscellaneous error</p>
      </dd>

     

    </dl>

   </div>
  </div>



 </div>

 


































































































































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="tokyotyrant.add.html">TokyoTyrant::add</a> — Adds to a numeric key</li><li><a href="tokyotyrant.connect.html">TokyoTyrant::connect</a> — Connect to a database</li><li><a href="tokyotyrant.connecturi.html">TokyoTyrant::connectUri</a> — Connects to a database</li><li><a href="tokyotyrant.construct.html">TokyoTyrant::__construct</a> — Construct a new TokyoTyrant object</li><li><a href="tokyotyrant.copy.html">TokyoTyrant::copy</a> — Copies the database</li><li><a href="tokyotyrant.ext.html">TokyoTyrant::ext</a> — Execute a remote script</li><li><a href="tokyotyrant.fwmkeys.html">TokyoTyrant::fwmKeys</a> — Returns the forward matching keys</li><li><a href="tokyotyrant.get.html">TokyoTyrant::get</a> — The get purpose</li><li><a href="tokyotyrant.getiterator.html">TokyoTyrant::getIterator</a> — Get an iterator</li><li><a href="tokyotyrant.num.html">TokyoTyrant::num</a> — Number of records in the database</li><li><a href="tokyotyrant.out.html">TokyoTyrant::out</a> — Removes records</li><li><a href="tokyotyrant.put.html">TokyoTyrant::put</a> — Puts values</li><li><a href="tokyotyrant.putcat.html">TokyoTyrant::putCat</a> — Concatenates to a record</li><li><a href="tokyotyrant.putkeep.html">TokyoTyrant::putKeep</a> — Puts a record</li><li><a href="tokyotyrant.putnr.html">TokyoTyrant::putNr</a> — Puts value</li><li><a href="tokyotyrant.putshl.html">TokyoTyrant::putShl</a> — Concatenates to a record</li><li><a href="tokyotyrant.restore.html">TokyoTyrant::restore</a> — Restore the database</li><li><a href="tokyotyrant.setmaster.html">TokyoTyrant::setMaster</a> — Set the replication master</li><li><a href="tokyotyrant.size.html">TokyoTyrant::size</a> — Returns the size of the value</li><li><a href="tokyotyrant.stat.html">TokyoTyrant::stat</a> — Get statistics</li><li><a href="tokyotyrant.sync.html">TokyoTyrant::sync</a> — Synchronize the database</li><li><a href="tokyotyrant.tune.html">TokyoTyrant::tune</a> — Tunes connection values</li><li><a href="tokyotyrant.vanish.html">TokyoTyrant::vanish</a> — Empties the database</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="tokyo-tyrant.examples.html">范例</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tokyotyrant.add.html">TokyoTyrant::add</a></div>
 <div class="up"><a href="book.tokyo-tyrant.html">tokyo_tyrant</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
